// Get all elements with class "w95"
const w95Elements = document.querySelectorAll(".w95");

let totalSum = 0; // Initialize a variable to store the total sum

// Loop through each "w95" element and check the following element for "已完成"
w95Elements.forEach((element) => {
  const number = parseInt(element.textContent.trim(), 10);
  const nextElement = element.nextElementSibling;

  if (nextElement && nextElement.textContent.trim() === "已完成") {
    totalSum += number; // Add the number to the total sum
  }
});

console.log(
  `Total sum of numbers inside "w95" elements with "已完成": ${totalSum}`
);
